package com.kfirszt.elearning.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.springframework.beans.factory.annotation.Autowired;

import com.kfirszt.elearning.persistence.service.CityService;
import com.kfirszt.elearning.persistence.service.UserService;
import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport implements ServletRequestAware, ServletResponseAware{

	private static final long serialVersionUID = 1L;
	
	private HttpServletRequest servletRequest;

	private HttpServletResponse servletResponse;
	
	@Autowired
	protected CityService cityService;
	
	@Autowired
	protected UserService userService;
	
	@Override
	public String execute() throws Exception {
		return super.execute();
	}

	@Override
	public void setServletResponse(HttpServletResponse arg0) {
		this.servletResponse = arg0;
		
	}

	@Override
	public void setServletRequest(HttpServletRequest arg0) {
		this.servletRequest = arg0;
	}

	public HttpServletRequest getServletRequest() {
		return servletRequest;
	}

	public HttpServletResponse getServletResponse() {
		return servletResponse;
	}

	public CityService getCityService() {
		return cityService;
	}

	public void setCityService(CityService cityService) {
		this.cityService = cityService;
	}

}
